package xingzhuang;

import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		Rectangle[] r = new Rectangle[2];
		Circle[] c = new Circle[2];
		int zhou = 0, mian = 0;
		for (int i = 0; i < 2; i++) {
			int w = in.nextInt();
			int l = in.nextInt();
			r[i] = new Rectangle(w, l);
			zhou = zhou + r[i].getPerimeter();
			mian = mian + r[i].getArea();
		}
		for (int i = 0; i < 2; i++) {
			int d = in.nextInt();
			c[i] = new Circle(d);
			zhou = zhou + c[i].getPerimeter();
			mian = mian + c[i].getArea();
		}

		System.out.println(zhou);
		System.out.println(mian);
		System.out.println(Arrays.toString(r));
		System.out.println(Arrays.toString(c));

	}

}
